package algorithm.common;

/**
 * @Author: Hevery
 * @Description:
 * @Date: Created on 2017/9/9
 * @Modified By:
 */

import java.util.ArrayList;
import java.util.Scanner;

public class Main5 {
    public static boolean flag=false;
    public void swap(int a[],int k,int n){
        int m;
        m=a[k];
        a[k]=a[n];
        a[n]=m;
    }

    private boolean checkout(int[] list){
        for(int i=0;i<list.length-1;i++){
            if(list[i]*list[i+1]%4==0){
                continue;
            }else{
                return false;
            }
        }
        return true;
    }
    public void perm(int list[],int k,int m){
        int i;
        if(k>m){
            if(checkout(list)){
                flag=true;
            }
        }else if(!flag){
            for (i=k;i<=m;i++){
                swap(list,k,i);
                perm(list,k+1,m);
                swap(list,k,i);
            }
        }
    }
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int cnt=sc.nextInt();
        int[][] list=new int[cnt][];
        for(int i=0;i<cnt;i++){
            int n=sc.nextInt();
            list[i]=new int[n];
            for(int j=0;j<n;j++){
                list[i][j]=sc.nextInt();
            }
        }

        Main5 sort=new Main5();
        for(int i=0;i<cnt;i++){
            sort.perm(list[i],0,list[i].length-1);
            if(flag){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
            flag=false;
        }
        sc.close();
    }
}